阅读记录

《不可达代码(BL)我娶了儿子当老婆?!》

104. 时凛生日贺卡(html)

《不可达代码(BL)我娶了儿子当老婆?!》全本免费阅读

<!DOCTYPEhtml>

<htmllang="zh-CN">

<head>

<metacharset="UTF-8">

<title>To.ShiLin:HAPPYBIRTHDAY!!!</title>

<style>

*{

margin:0;

padding:0;

box-sizing:border-box;

}

body{

width:100vw;

height:100vh;

overflow:hidden;

background:#081430;

background-image:radial-gradient(#102b600%,#050c20100%);

font-family:"MicrosoftYaHei",sans-serif;

display:flex;

align-items:center;

justify-content:center;

}

.text-box{

text-align:center;

z-index:2;

}

h1{

font-size:4rem;

color:#74c0ff;

text-shadow:0012px#409cff,0024px#2078ff;

margin-bottom:20px;

}

p{

font-size:1.8rem;

color:#b8e0ff;

text-shadow:008px#55aaff;

}

canvas{

position:absolute;

top:0;

left:0;

z-index:1;

}

</style>

</head>

<body>

<canvasid="fireCanvas"></canvas>

<divclass="text-box">

<h1>To.ShiLin:HAPPYBIRTHDAY!!!</h1>

<p>HAPPYBIRTHDAY</p>

</div>

<script>

constcanvas=document.getElementById("fireCanvas");

constctx=canvas.getContext("2d");

canvas.width=window.innerWidth;

canvas.height=window.innerHeight;

window.addEventListener('resize',()=>{

canvas.width=window.innerWidth;

canvas.height=window.innerHeight;

})

classParticle{

constructor(x,y,color){

this.x=x;

this.y=y;

this.speedX=(Math.random()-0.5)*6;

this.speedY=(Math.random()-0.5)*6;

this.alpha=1;

this.color=color;

this.size=Math.random()*3+1;

this.gravity=0.05;

}

update(){

this.x+=this.speedX;

this.y+=this.speedY;

this.speedY+=this.gravity;

this.alpha-=0.012;

}

draw(){

ctx.save();

ctx.globalAlpha=this.alpha;

ctx.fillStyle=this.color;

ctx.beginPath();

ctx.arc(this.x,this.y,this.size,0,Math.PI*2);

ct

【当前章节不完整】

【退出畅读后阅读完整章节!】

上一章 目录 下一章
[ 章节错误! ]      [ 停更举报 ]
猜你喜欢
小说推荐
所有小说均由网友上传,不以盈利为目的
如有侵权,请联系删除